package com.github.data_manage.domain.po

import jakarta.persistence.Entity
import jakarta.persistence.GeneratedValue
import jakarta.persistence.GenerationType
import jakarta.persistence.Id
import jakarta.persistence.Index
import jakarta.persistence.Table
import org.jetbrains.annotations.NotNull
import java.math.BigDecimal

@Entity
@Table(
    name = "t_fund_depth_research",
    indexes = [Index(name = "fund_depth_research_fund_id", columnList = "fundId", unique = true)]
)
open class FundDepthResearch() {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    open var id: Long? = null

    @NotNull("所属基金信息不能为空")
    open var fundId: Int? = null

    open var investmentOverview: BigDecimal? = BigDecimal.ZERO

    // 手动输入
    open var investmentPhilosophy: BigDecimal? = BigDecimal.ZERO

    // 手动输入
    open var investmentProcess: BigDecimal? = BigDecimal.ZERO

    // 手动输入
    open var researchTeamRate: BigDecimal? = BigDecimal.ZERO

    open var overallReturnRate: BigDecimal? = BigDecimal.ZERO

    open var overAllRiskRate: BigDecimal? = BigDecimal.ZERO

    // 手动输入
    open var portfolioConstructioRate: BigDecimal? = BigDecimal.ZERO

    open var annReturn: BigDecimal? = BigDecimal.ZERO

    open var arRankRate: BigDecimal? = BigDecimal.ZERO

    open var srRate: BigDecimal? = BigDecimal.ZERO

    open var hrRate: BigDecimal? = BigDecimal.ZERO

    open var hrRank: BigDecimal? = BigDecimal.ZERO

    open var hitRatio: BigDecimal? = BigDecimal.ZERO

    open var annVol: BigDecimal? = BigDecimal.ZERO

    open var avRank: BigDecimal? = BigDecimal.ZERO

    // 通过ann.vol排名来计算
    open var avRate: BigDecimal? = BigDecimal.ZERO

    open var betaRate: BigDecimal? = BigDecimal.ZERO

    // 通过 max return来计算
    open var mddRate: BigDecimal? = BigDecimal.ZERO

    open var beta: BigDecimal? = BigDecimal.ZERO

    // 手动输入
    open var workHard: BigDecimal? = BigDecimal.ZERO

    // 手动输入
    open var careAboutInvestors: BigDecimal? = BigDecimal.ZERO

    // 手动输入
    open var independentThinking: BigDecimal? = BigDecimal.ZERO

    // 手动输入
    open var openMinded: BigDecimal? = BigDecimal.ZERO

    // 手动输入
    open var rational: BigDecimal? = BigDecimal.ZERO

    // 手动输入
    open var riskSense: BigDecimal? = BigDecimal.ZERO

    // 手动输入
    open var tradeSense: BigDecimal? = BigDecimal.ZERO

    // 手动输入
    open var learn: BigDecimal? = BigDecimal.ZERO

    // 手动输入
    open var talent: BigDecimal? = BigDecimal.ZERO

    // 手动输入
    open var vision: BigDecimal? = BigDecimal.ZERO

    open var screenOverallRate: BigDecimal? = BigDecimal.ZERO

    // 手动输入
    open var meetingRate: BigDecimal? = BigDecimal.ZERO

    // 手动输入
    open var productRate: BigDecimal? = BigDecimal.ZERO

    open var investmentRate: BigDecimal? = BigDecimal.ZERO

    open var riskRate: BigDecimal? = BigDecimal.ZERO

    open var keyManRate: BigDecimal? = BigDecimal.ZERO

    open var businessRate: BigDecimal? = BigDecimal.ZERO

    open var monsRate: BigDecimal? = BigDecimal.ZERO

    open var monsRank: BigDecimal? = BigDecimal.ZERO

    open var aumRate: BigDecimal? = BigDecimal.ZERO

    open var midBackRate: BigDecimal? = BigDecimal.ZERO

    // 手动输入
    open var mons: Int? = 0

    // 基金aum
    open var aum: BigDecimal? = BigDecimal.ZERO

    // 手动输入
    open var salesRate: BigDecimal? = BigDecimal.ZERO

    // 手动输入
    open var cooRate: BigDecimal? = BigDecimal.ZERO

    // 手动输入
    open var midOfficeRate: BigDecimal? = BigDecimal.ZERO

    // 手动输入
    open var investorBaseRate: BigDecimal? = BigDecimal.ZERO

    open var liquidityTerms: BigDecimal? = BigDecimal.ZERO

    open var benchmark: String? = ""

    open var intelligence: BigDecimal? = null


    constructor(fundId: Int) : this() {
        this.fundId = fundId
    }

    constructor(fundId: Int, meetingRate: BigDecimal?) : this() {
        this.fundId = fundId
        this.meetingRate = meetingRate
    }
}
